/*
* @Author: name
* @Date:   2018-10-08 17:30:51
* @Last Modified by:   name
* @Last Modified time: 2018-10-08 21:38:37
*/

var app = new Vue({
    el:"#todolist",
    data:{
        //添加文本框的数据
        addInp:"",
        listItems:[],
        can:"",
        isLogin:false
    },
    methods:{
        //添加
        add:function(){
            this.listItems.push({title:this.addInp,isCompleted:false});
            this.addInp="";
        },
        del:function(index){
            this.listItems.splice(index,1)
        },
        ond:function(index){
            // this.addInp="222"
            this.isLogin = !this.isLogin;
            this.listItems.push({title:this.can});

        }
    }
})